package com.custom.dialogdemo.dialog;

import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Color;
import android.view.View;

public class ColorDialog extends CommonDialog{

	public ColorDialog(Context context) {
		super(context);
	}

	public ColorDialog(Context context, int defStyle) {
		super(context, defStyle);
	}

	protected ColorDialog(Context context, boolean flag,
			DialogInterface.OnCancelListener listener) {
		super(context, flag, listener);
		
		container.setPadding(20, 20, 20, 20);
	}

	public void setNegativeButton(int negative,
			DialogInterface.OnClickListener listener) {
		setNegativeButton(getContext().getString(negative), listener);
		
		buttonDivider.setVisibility(View.GONE);
		barDivider.setVisibility(View.GONE);
		
        int strokeColor = Color.parseColor("#787984");
        negativeBt.setTextColor(strokeColor);
//        GradientDrawable background = CustomDrawable.getDrawable(strokeColor);
//        negativeBt.setBackground(background);
	}
	
	public void setColorPositiveButton(String positive,
			final DialogInterface.OnClickListener listener) {
		setPositiveButton(positive, listener);
		
		buttonDivider.setVisibility(View.GONE);
		barDivider.setVisibility(View.GONE);
		
        int strokeColor = Color.parseColor("#ED7020");
        positiveBt.setTextColor(strokeColor);
//        GradientDrawable background = CustomDrawable.getDrawable(strokeColor);
//        positiveBt.setBackground(background);
	}
}
